package cn.cs.service;

import cn.cs.mapper.ClientBigUserMapper;
import cn.cs.mapper.UserCompanyMapper;
import cn.cs.pojo.ClientBigUser;
import cn.cs.pojo.ClientUser;
import cn.cs.pojo.UserCompany;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


@RestController
public class ClientBigUserService {

    @Resource
    private ClientBigUserMapper clientBigUserMapper;


    @RequestMapping(value = "/getClientBigUserListByMap", method = RequestMethod.POST)
    public List<ClientUser> getClientUserListByMap(@RequestBody Map<String, Object> param) throws Exception{
        return clientBigUserMapper.getClientUserListByMap(param);
    }

    @RequestMapping(value = "/getClientBigUserCountByMap", method = RequestMethod.POST)
    public Integer getClientUserCountByMap(@RequestBody Map<String, Object> param) throws Exception{
        return clientBigUserMapper.getClientUserCountByMap(param);
    }

    @RequestMapping(value = "/addClientBigUser", method = RequestMethod.POST)
    public Integer addClientBigUser(@RequestBody ClientUser clientUser) throws Exception{
        return clientBigUserMapper.insertClientBigUser(clientUser);
    }

    @RequestMapping(value = "/modifyClientBigUser", method = RequestMethod.POST)
    public Integer modifyClientBigUser(@RequestBody ClientUser clientUser) throws Exception{
        return clientBigUserMapper.updateClientBigUser(clientUser);
    }

    @RequestMapping(value = "/deleteClientBigUserById", method = RequestMethod.POST)
    public Integer deleteClientBigUserById(@RequestParam("id") Long id) throws Exception{
        return clientBigUserMapper.deleteClientBigUserById(id);
    }

    @RequestMapping(value = "/getMaxCode", method = RequestMethod.POST)
    public Integer getMaxCode(@RequestParam("param") String param) throws Exception{
        return clientBigUserMapper.getMaxCode(param);
    }


}
